<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>档案管理系统</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/dist/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/dist/css/ionicons.min.css">
    <link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/static/dist/css/skins/all-skins.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-treeview.css">
    <link rel="stylesheet" href="/static/css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="/static/layer/theme/default/layer.css">
    <link rel="stylesheet" href="/static/webCss/dajs.css?v=shujubuwqd12138">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/static/plugins/ie9/html5shiv.min.js"></script>
    <script src="/static/plugins/ie9/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue" style="font-size: medium">
<img class="bgone" src="/static/img/jsbj.png" id="bj1"/>
<img class="bgone2" src="/static/img/loginbj2.png" id="bj2"/>
<!--<img class="bgone2" src="/static/img/jsbj2.jpg" />-->
<div class="content row" id="yhgl">
    <div class="modal" id="lxxzModal" data-backdrop="static" >
        <div class="modal-dialog" style="height: 500px">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">选择档案类型</h4>
                </div>
                <div class="modal-body">
                    <div id="lxTree"></div>
                </div>
                <div class="modal-footer">
                    <!--<button type="button" class="btn btn-default pull-left" data-dismiss="modal" @click="close">关闭</button>-->
                    <!--<button @click="sureLxSelect" type="button" class="btn btn-primary">确认选择</button>-->
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <div class="modal" id="daxqDiv" data-backdrop="static">
        <div class="modal-dialog" style="height: 600px;width: 900px">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">档案详情</h4>
                </div>
                <div class="modal-body row" style="height: 600px">
                    <div class="col-xs-5" style="overflow:auto;height: 600px">
                        <h5>材料信息列表</h5>
                        <div id="tree"></div>
                    </div>
                    <div class="col-xs-7 row" style="overflow: auto;height: 600px">
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 基本信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label>档案类型</label>
                                            <div>
                                                <div class="input-group">
                                                    <input name="typeName" type="text" class="form-control input-sm" v-model="showDa.typeName" readonly style="width: 217.5px">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>档案编号</label>
                                            <div class="input-group">
                                                <input name="dabh" v-model="showDa.dabh" type="text" class="form-control input-sm" readonly style="width: 217.5px">
                                            </div>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>年份</label>
                                            <input v-model="showDa.year" name="year" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>项目名称</label>
                                            <input v-model="showDa.xmmc" name="xmmc" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>顺序号</label>
                                            <input v-model="showDa.sxh" name="lb" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>大厅受理编号</label>
                                            <input v-model="showDa.dtslbh" name="dtslbh" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>原盒号</label>
                                            <input v-model="showDa.yhh" name="yhh" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>页数</label>
                                            <input v-model="showDa.ys" name="ys" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 建设信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label>建设单位</label>
                                            <input v-model="showDa.jsdw" name="jsdw" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>建设位置</label>
                                            <input v-model="showDa.jswz" name="jswz" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>建设项目选址意见书时间</label>
                                            <input v-model="showDa.jsxmxzyjssj" name="jswz" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>建设用地规划许可证时间</label>
                                            <input v-model="showDa.jsydghxkzsj" name="jsydghxkzsj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label >建设工程规划许可证时间</label>
                                            <input v-model="showDa.jsgcghxkzsj" name="jsgcghxkzsj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>建设工程竣工规划验收合格证时间</label>
                                            <input v-model="showDa.jsgcjgghyshgsj" name="jsgcjgghyshgsj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>建设工程施工许可证时间</label>
                                            <input v-model="showDa.jsgcsgxkzsj" name="jsgcsgxkzsj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>建设工程施工许可证编号</label>
                                            <input v-model="showDa.jsgcsgxkzbh" name="jsgcsgxkzbh" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 工程信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label >工程项目名称</label>
                                            <input v-model="showDa.gcxmmc" name="gcxmmc" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>工程建设规模</label>
                                            <input v-model="showDa.gcjsgm" name="gcjsgm" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>工程竣工项目名称</label>
                                            <input v-model="showDa.gcjgxmmc" name="gcjgxmmc" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>工程竣工建设规模</label>
                                            <input v-model="showDa.gcjgjsgm" name="gcjgjsgm" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                        <!-- Tabs within a box -->
                        <ul class="nav nav-tabs pull-right">
                            <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                            <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                            <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 规划信息</li>
                        </ul>
                        <div class="tab-content no-padding">
                            <!-- Morris chart - Sales -->
                            <div class="chart tab-pane active" style="position: relative">
                                <div class="row">
                                    <div class="form-group col-xs-6">
                                        <label >规划项目名称</label>
                                        <input v-model="showDa.ghxmmc" name="ghxmmc" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-6">
                                        <label >规划用地面积</label>
                                        <input v-model="showDa.ghydmj" name="ghydmj" type="text" class="form-control input-sm" readonly>
                                    </div>
                                </div>
                            </div>
                            <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                        </div>
                    </div>
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 选址信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label>选址项目名称</label>
                                            <input v-model="showDa.xzxmmc" name="xzxmmc" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>选址用地面积</label>
                                            <input v-model="showDa.xzydmj" name="xzydmj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 施工信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label>施工工程名称</label>
                                            <textarea v-model="showDa.sggcmc" name="sggcmc" type="text" class="form-control input-sm" readonly></textarea>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>施工建设规模</label>
                                            <input v-model="showDa.sgjsgm" name="sgjsgm" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 其他信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label>项目通过时间</label>
                                            <input v-model="showDa.xmfatgsj" name="xmfatgsj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>档案存储位置</label>
                                            <input v-model="showDa.daccwz" name="daccwz" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>超链接</label>
                                            <input v-model="showDa.clj" name="clj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>著录员</label>
                                            <input v-model="showDa.zly" name="zly" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>著录时间</label>
                                            <input v-model="showDa.zlsj" name="zlsj" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>其他</label>
                                            <input v-model="showDa.qt" name="qt" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-12">
                                            <label>备注</label>
                                            <textarea v-model="showDa.bz" name="bz" type="text" class="form-control input-sm" readonly>
                            </textarea>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                    </div>

                </div>
                <div class="modal-footer text-center">
                    <button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

    <div class="modal" id="daxqwsDiv" data-backdrop="static">
        <div class="modal-dialog" style="height: 620px;width: 900px">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">档案详情</h4>
                </div>
                <div class="modal-body row">
                    <div class="col-xs-5"  style="overflow:auto;height: 600px">
                        <h5>材料信息列表</h5>
                        <div id="tree2"></div>
                    </div>
                    <div class="col-xs-7 row" >
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 基本信息</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-6">
                                            <label >档案类型</label>
                                            <input  name="typeName" type="text" class="form-control input-sm" v-model="showWs.typeName" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>档案编号</label>
                                            <div class="input-group">
                                                <input name="dabh"v-model="showWs.dabh" type="text" class="form-control input-sm" id="wsdabh" readonly style="width: 232.5px">
                                            </div>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>案卷题名</label>
                                            <input v-model="showWs.wjmc" name="wjmc" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>年份</label>
                                            <input v-model="showWs.nf" name="nf" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label >页号</label>
                                            <input v-model="showWs.yh" name="yh" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label >页数</label>
                                            <input v-model="showWs.ys" name="ys" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>总盒号</label>
                                            <input v-model="showWs.zhh" name="zhh" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>单位名称</label>
                                            <input v-model="showWs.dwmc" name="dwmc" type="text" class="form-control input-sm" readonly>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label>时间</label>
                                            <div class="input-group date">
                                                <input v-model="showWs.sj"  name="sj"  type="text" class="form-control input-sm" readonly style="width: 232.5px">
                                            </div>
                                            <!--<small class="help-block" data-bv-validator="notEmpty" data-bv-for="cwrq" data-bv-result="INVALID" style="color: #dd4b39" v-show="isNull">成文日期不能为空</small>-->
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <label >文号</label>
                                            <input v-model="showWs.wh" name="wh" type="text" class="form-control input-sm" readonly>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <!-- Tabs within a box -->
                            <ul class="nav nav-tabs pull-right">
                                <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 备注</li>
                            </ul>
                            <div class="tab-content no-padding">
                                <!-- Morris chart - Sales -->
                                <div class="chart tab-pane active" style="position: relative">
                                    <div class="row">
                                        <div class="form-group col-xs-12">
                                            <label>备注</label>
                                            <textarea class="form-control" v-model="showWs.bz" readonly></textarea>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                            </div>
                        </div>


                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

    <div v-show="showmain">
        <div class="row" style="padding-top: 1%;padding-left: 1%;padding-bottom: 1%">
            <div class="row" style="padding-top: 1%;padding-left: 1%">
                <div class="col-xs-3" style="display: table">
                    <input type="text" class="form-control" placeholder="输入关键字进行模糊查询" v-model="keyword" style="margin-left: 7px;">
                    <span class="input-group-addon btn  btn-default"  @click="cancelSearch"><i class="fa fa-search"></i></span>
                </div>
                <div class="col-xs-3 col-xs-offset-6">
                    <div class="row">
                        <div class="col-xs-4" style="padding-left: 13%;">
                            <a class="btn cancelBtn" @click="dc">Excel导出</a>
                        </div>
                        <div class="col-xs-4">
                            <a class="btn cancelBtn" @click="jnwjk" v-show="daShow">当前页卷内文件库</a>
                            <a class="btn cancelBtn" @click="cancelUp" v-show="clShow">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp返回案卷&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</a>
                        </div>
                        <div class="col-xs-4">
                            <a class="btn cancelBtn" @click="goback" style="margin-left: 11%;">返回</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class=" col-xs-12" style="overflow: auto">
            <div style="margin-top: -2%;">
                <div class="box-body" style="height: 750px" v-show="daShow">
                    <table class="table table-bordered table-hover text-center" id="daTable">

                    </table>
                </div>
                <div class="box-body" style="height: 750px" v-show="gryfShow">
                    <table class="table table-bordered table-hover text-center" id="gryfTable">

                    </table>
                </div>
                <div class="box-body" style="height: 750px" v-show="clShow">
                    <table class="table table-bordered table-hover text-center" id="clTable">

                    </table>
                </div>
            </div>
        </div>
    </div>
    <div v-show="showstart">
        <div class="row" style="padding-top: 239px">
            <div class="row">
                <div class="col-xs-offset-4 row" style="margin-left: 31.3333%!important;">
                    <div class="col-xs-12" >
                        <div style="padding-top: 15px;padding-left: 83px"  class="col-xs-1">
                            <img src="/static/img/js.png" style="height: 50px;width: 50px">
                        </div>
                        <div class="col-xs-3" style="padding-left: 95px">
                            <h1>
                                档案检索
                            </h1>
                        </div>
                    </div>
                    <!--<div class="col-xs-2">-->
                        <!--<label class="" >文档类型：</label>-->
                        <!--<select class="form-control" v-model="wdlx" id="selector">-->
                            <!--<option :value="kj">科技档案</option>-->
                            <!--<option :value="ws">文书档案</option>-->
                            <!--<option value="-1">材料信息</option>-->
                        <!--</select>-->
                        <!--&lt;!&ndash;<div class="input-group">&ndash;&gt;-->
                        <!--&lt;!&ndash;<span class="input-group-addon btn btn-primary" data-toggle="modal" data-target="#lxxzModal" @click="kjSelect">选择</span>&ndash;&gt;-->
                        <!--&lt;!&ndash;<input name="dalx" type="text" class="form-control input-sm" v-model="wdlxName" readonly>&ndash;&gt;-->
                        <!--&lt;!&ndash;</div>&ndash;&gt;-->
                    <!--</div>-->
                    <div class="col-xs-5">
                        <label class="">检索条件：</label>
                        <input type="text" class="form-control" v-model="keyword"  placeholder="请输入关键字" onkeydown="return isSearch(event)" style="width: 106%">
                    </div>
                    <div class="col-xs-1">
                        <label class="">&nbsp;</label>
                        <a type="submit" class="form-control btn-primary jsBtn" @click="tjjs2" style="text-align: center;width: 100px">条件检索</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div v-show="showSearch">
        <div class="col-xs-3 left">
            <div>
                <div class="dalx">档案类型</div>
            </div>
            <div class="box" style="height: 700px;overflow: auto">
                <div id="dalxTree"></div>
            </div>
        </div>
        <div class="col-xs-9 right">
            <div class="row" style="padding-top: 2%;padding-left: 1%">
                <div class="row col-xs-6">
                    <div v-show="daShow2">
                        <div class="col-xs-2">
                            <label style="color: #000000!important;padding-top: 7%;padding-left: 30px">年份:</label>
                        </div>
                        <div class="col-xs-2">
                            <input type="text" class="form-control" v-model="startyear" id="startyear">
                        </div>
                        <div class="col-xs-1">
                            <label style="color: #000000!important;padding-top: 22%;margin-left: -10px">——</label>
                        </div>
                        <div class="col-xs-2">
                            <input type="text" class="form-control" v-model="stopyear" id="stopyear">
                        </div>
                        <div class="col-xs-5" style="display: table">
                            <input type="text" class="form-control" placeholder="输入关键字进行模糊查询" v-model="keyword">
                            <span class="input-group-addon btn  btn-default"  @click="cancelSearch"><i class="fa fa-search"></i></span>
                        </div>
                    </div>
                </div>
                <div class="row col-xs-4 col-xs-offset-2">
                    <div class="col-xs-4 col-xs-offset-4">
                        <a class="btn cancelBtn" @click="daajk">档案案卷库</a>
                    </div>
                    <div class="col-xs-4">
                        <a class="btn cancelBtn" @click="jnwjk2">当前页卷内文件库</a>
                    </div>
                </div>
            </div>
            <div v-show="daShow2">
                <table class="table table-bordered table-hover text-center" id="dalxTable">

                </table>
            </div>
            <div v-show="clShow2" style="overflow: auto">
                <table class="table table-bordered table-hover text-center" id="clTable2">

                </table>
            </div>
        </div>
    </div>
</div>

<script src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<!-- Slimscroll -->
<script src="/static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="/static/plugins/fastclick/fastclick.js"></script>

<!-- AdminLTE App -->
<script src="/static/dist/js/app.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="/static/dist/js/demo.js"></script>
<!--tabs-->
<script src="/static/dist/js/app_iframe.js"></script>
<script src="/static/js/bootstrap-treeview.js"></script>
<script src="/static/js/bootstrapValidator.min.js"></script>
<script src="/static/js/bootstrap-table.min.js"></script>
<script src="/static/js/bootstrap-table-zh-CN.js"></script>
<script src="/static/js/vue.js"></script>
<script src="/static/js/vue-resource.min.js"></script>
<script src="/static/layer/layer.js"></script>
<script src="/static/js/myJs.js?v=shujubuwqd12138"></script>
<script src="/static/dist/js/pages/wJs.js"></script>
<script src="/static/js/newJs.js?v=shujubuwqd12138"></script>

<script type="text/javascript">
    newCss("/static/webCss/dajs.css");
    $(document).off('change','#stopyear').on('change','#stopyear',function(){
        var cwTime = document.getElementById('stopyear').value;
        if(cwTime !== ""&&$("#stopyear").val() !== null){
            var cwFormat = cwTime.match(/^(\d{4})$/);
            if(cwFormat == null){
                cxAlert("年份必须为四位数字");
                document.getElementById('stopyear').value = "";
            }
        }
    });
    $(document).off('change','#startyear').on('change','#startyear',function(){
        var cwTime = document.getElementById('startyear').value;
        if(cwTime !== ""&&$("#startyear").val() !== null){
            var cwFormat = cwTime.match(/^(\d{4})$/);
            if(cwFormat == null){
                cxAlert("年份必须为四位数字");
                document.getElementById('startyear').value = "";
            }
        }
    });
    var wdlxIds = new Array();
    var dabhIds = new Array();
    function paramsMatter(value,row,index) {
        var span=document.createElement('span');
        span.setAttribute('title',value);
        span.innerHTML = value;
        return span.outerHTML;
    }
    window.document.onkeydown = isSearch2;
    function isSearch2(event) {
        var keynum2;
        var keychar;
        var numcheck;

        if(window.event) // IE
        {
            keynum2 = event.keyCode
        } else if(event.which) // Netscape/Firefox/Opera
        {
            keynum2 = event.which
        }
        if(keynum2 === 13){
            vue.tjjs2();
        }
    }
    function isSearch(event) {
        var keynum;
        var keychar;
        var numcheck;

        if(window.event) // IE
        {
            keynum = event.keyCode
        } else if(event.which) // Netscape/Firefox/Opera
        {
            keynum = event.which
        }
        if(keynum === 13){
            vue.tjjs2();
        }
    }
    //得到父节点数组
    var parentIds = new Array();
    function getParentIds(sonId) {
        var allLx = vue.$data.allLx;
        if(allLx != null){
            for(var i = 0;i < allLx.length;i++){
                if(allLx[i].id == sonId){
                    parentIds.push(allLx[i].parentId);
                    if(allLx[i].parentId == 0){
                        break;
                    }else{
                        getParentIds(allLx[i].parentId);
                    }
                }
            }
        }
        return parentIds;
    }
    //判断节点是否为科技档案
    function isKj(sonId) {
        var sonId = sonId;
        var kjdaId;
        var allLx = vue.$data.allLx;
        var array = getParentIds(sonId);
        for(var j = 0;j < allLx.length;j++){
            if(allLx[j].dalxName == '科技档案'){
                kjdaId = allLx[j].id;
                break;
            }
        }
        for(var l = 0;l <array.length;l++){
            if(sonId == kjdaId){
                return true;
            }else if(array[l] == kjdaId){
                return true;
            }else {
                return false;
            }
        }
        parentIds = [];
    }
    var kw;
    function getid(data) {
        for(var i = 0 ;i < data.length;i++){
            if(data[i].text == "科技档案"){
                vue.$data.wdlx == data[i].id;
                break;
            }else {
                getid(data[i].nodes);
            }
        }
    }

    function showXq(dabh,typeId) {
        var sfws;
        var datas = dabh.split("-");
        //this.gdxx.qzh = datas[0];
        //this.gdxx.year = datas[1];
        var code = datas[0];
        code = datas[0].substring(0,code.length-4)
        $.get('/dagl/api/queryCode?code='+code).then( function (result) {
            var data = result.data;
            if (result.code == 200) {
                sfws = data.sfws;
                if(sfws == 1){
                    top.addTabs({
                        id: "19001113",
                        text: "详情",
                        icon: "fa fa-tasks",
                        url: "kjxq?typeId="+typeId+"&dabh="+dabh,
                        targetType: "iframe-tab",
                        close:true,
                    });
                }else if(sfws == 3){
                    top.addTabs({
                        id: "19001114",
                        text: "详情",
                        icon: "fa fa-tasks",
                        url: "wsxq?typeId="+typeId+"&dabh="+dabh,
                        targetType: "iframe-tab",
                        close:true,
                    });
                }else {
                    top.addTabs({
                        id: "190011131",
                        text: "详情",
                        icon: "fa fa-tasks",
                        url: "gryfxq?typeId="+vue.$data.wdlx+"&dabh="+dabh,
                        targetType: "iframe-tab",
                        close:true,
                    });
                }
            }else{
                cxAlert(data.mess);
            }
        });
    }

    function showClxq(id) {
        top.addTabs({
            id: "19001121",
            text: "详情",
            icon: "fa fa-tasks",
            url: "ckclxx?id="+id,
            targetType: "iframe-tab",
            close:true,
        });
    }
    //生成序号
    function serialNumber(value, row, index) {
        var option = $("#dalxTable").bootstrapTable('getOptions');
        var pageSize = option.pageSize; //获取每页显示的数量
        var pageNumber = option.pageNumber; //获取当前是第几页
        return pageSize * (pageNumber - 1) + index + 1; //返回序号，注意index是从0开始的，所以要加上1
    }

    //查看
    function ck(dalxId,root,dalx) {
        dabhIds = [];
        vue.$data.wdlx = dalxId;
        vue.$data.root = root;
        if(dalx === "个人用房"){
            vue.$data.isGryf = true;
        }else{
            vue.$data.isGryf = false;
        }
        vue.tjjs();
    }

    var vue = new Vue({
        el: '#yhgl',
        data: {
            startyear:null,//开始年份
            stopyear:null,//结束年份
            isGryf:false,//是否为个人用房
            root:null,//根类型
            wdlxIds:[],
            daShow:true,
            clShow:false,
            daShow2:true,
            clShow2:false,
            gryfShow:false,
            searchShow:true,
            kj:null,
            ws:null,
            showstart:true,
            showmain:false,
            showSearch:false,
            sort:'desc',
            keyword:null,
            wdlxName:'科技档案',
            wdlx:null,
            dabh:null,
            ajbh:null,
            xkzh:null,
            damc:null,
            showDa:{
                typeName:null,
                type_name:null,//
                id:null,
                typeId:null,//
                dabh:null,
                xmbh:null,
                xmmc:null,
                year:null,
                dtslbh:null,//大厅受理编号
                yhh:null,//原盒号
                jsdw:null,//建设单位
                jswz:null,//建设位置
                jsxmxzyjssj:null,//建设项目选址意见书时间
                xzxmmc:null,//选址项目名称
                xzydmj:null,//选址用地面积
                jsydghxkzsj:null,//建设用地规划许可证时间
                ghxmmc:null,//规划项目名称
                ghydmj:null,//规划用地面积
                jsgcghxkzsj:null,//建设工程规划许可证时间
                gcxmmc:null,//工程项目名称
                gcjsgm:null,//工程建设规模
                jsgcjgghyshgsj:null,//建设工程竣工规划验收合格证时间
                gcjgxmmc:null,//工程竣工项目名称
                gcjgjsgm:null,//工程竣工建设规模
                jsgcsgxkzsj:null,//建设工程施工许可证时间
                jsgcsgxkzbh:null,//建设工程施工许可证编号
                sggcmc:null,//施工工程名称
                sgjsgm:null,//施工建设规模
                qt:null,//其他
                xmfatgsj:null,//项目通过时间
                ys:null,//页数
                daccwz:null,//档案存储位置
                clj:null,//超链接
                zly:null,//著录员
                zlsj:null,//著录时间
                bz:null,//备注
            },
            showWs:{
                typeName:null,
                //files:[],
                //id:null,
                dabh:null,//档案编号
                wh:null,//文号
                yh:null,//页号
                ys:null,//页数
                zhh:null,//总盒号
                type_name:null,//档案类型
                typeId:null,//档案类型id
                dwmc:null,//单位名称
                sj:null,//时间
                nf:null,//年份
                bz:null
            },
            allLx:null,
            // showcl:null,
        },
        methods: {
            //档案案卷库
            daajk:function(){
                this.daShow2 = true;
                this.clShow2 = false;
            },
            //查询个人用房
            searchGryf:function(){
                $("#gryfTable").bootstrapTable('destroy');
                $('#gryfTable').bootstrapTable({
                    url: this.getUrl(),
                    contentType: "application/json; charset=UTF-8",
                    type: "GET",
                    dataType: 'json',
                    queryParamsType: "",
                    sortName : 'id',
                    sortOrder : 'desc',
                    singleSelect: false,
                    striped: true,
                    smartDisplay: false,
                    cache: false,
                    pagination:true,  //设置为 true 会在表格底部显示分页条。
                    paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                    pageSize:10,//每页初始显示的条数
                    pageList:[5,10],
                    toolbar: "#addtool",
                    sidePagination: 'server',
                    queryParams: function (params) {
                        this.sort = params.sortOrder;
                        return {
                            'pageNum':params.pageNumber,
                            'pageSize':params.pageSize,
                            'sort':params.sortOrder,
                        }
                    },
                    columns: [{
                        checkbox: true,
                    },{
                        field: 'id',
                        title: '顺序号',
                        sortable : true,
                        formatter:paramsMatter
                    },{
                        field: 'dabh',
                        title: '档案编号',
                        formatter:paramsMatter
                    }, {
                        field: 'townBsc',
                        title: '镇/办事处',
                        formatter:paramsMatter
                    },{
                        field: 'villageJwh',
                        title: '村/居委会',
                        formatter:paramsMatter
                    }, {
                        field: 'zhh',
                        title: '案卷题名',
                        formatter:paramsMatter
                    }, {
                        field: 'sqcl',
                        title: '申请材料',
                        formatter:paramsMatter
                    },{
                        field: 'cz',
                        title: '操作',
                        formatter: function (value, row, index) {
                            return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showXq(\''+row.dabh+'\',\''+row.typeId+'\')">详情</a>'
                        }
                    }],
                    responseHandler: function (res) {  //后台返回的结果
                        if (res.code == "200") {
                            var data = res.data;
                            var NewData = [];
                            dabhIds = [];
                            for(var i=0;i<data.data.length;i++){
                                NewData.push(data.data[i]);
                                dabhIds.push(data.data[i].dabh);
                            }
                            var data = {
                                rows: NewData,
                                total:data.total
                            };
                            return data;
                        }
                    }
                });
            },
            //得到dajsCx2接口的url
            getUrl:function(){
                if(this.keyword == null){
                    var url = '/dajsCx2?wdlx='+this.wdlx;
                }else {
                    var url = '/dajsCx2?wdlx='+this.wdlx+'&keyword='+this.keyword;
                }
                if(this.startyear == null && this.stopyear == null){
                    url = url;
                }else if(this.startyear == null){
                    url = url+'&stopyear='+this.stopyear;
                }else if(this.stopyear == null){
                    url = url+'&startyear='+this.startyear;
                }else {
                    url = url+'&startyear='+this.startyear+'&stopyear='+this.stopyear;
                }
                return url;
            },
            //查询文书
            searchWs:function(){
                $("#daTable").bootstrapTable('destroy');
                $('#daTable').bootstrapTable({
                    url: this.getUrl(),
                    contentType: "application/json; charset=UTF-8",
                    type: "GET",
                    dataType: 'json',
                    queryParamsType: "",
                    sortName : 'id',
                    sortOrder : 'desc',
                    singleSelect: true,
                    striped: true,
                    smartDisplay: false,
                    cache: false,
                    pagination:true,  //设置为 true 会在表格底部显示分页条。
                    paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                    pageSize:10,//每页初始显示的条数
                    pageList:[5,10],
                    toolbar: "#addtool",
                    sidePagination: 'server',
                    queryParams: function (params) {
                        this.sort = params.sortOrder;
                        return {
                            'pageNum':params.pageNumber,
                            'pageSize':params.pageSize,
                            'sort':params.sortOrder,
                        }
                    },
                    columns: [
                    //     {
                    //     checkbox : true,
                    // },
                        {
                        field: 'id',
                        title: '顺序号',
                        sortable : true,
                        formatter:paramsMatter
                    },{
                        field: 'dabh',
                        title: '档案编号',
                        formatter:paramsMatter
                    }, {
                        field: 'ajtm',
                        title: '案卷题名',
                        formatter:paramsMatter
                    },{
                        field: 'wh',
                        title: '文号',
                        formatter:paramsMatter
                    }, {
                        field: 'dwmc',
                        title: '单位名称',
                        formatter:paramsMatter
                    }, {
                        field: 'typeName',
                        title: '档案类型',
                        formatter:paramsMatter
                    }, {
                        field: 'year',
                        title: '档案年份',
                        formatter:paramsMatter
                    },{
                        field: 'cz',
                        title: '操作',
                        formatter: function (value, row, index) {

                            return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showXq(\''+row.dabh+'\',\''+row.typeId+'\')">详情</a>'
                        }
                    }],
                    responseHandler: function (res) {  //后台返回的结果
                        if (res.code == "200") {
                            var data = res.data;
                            var NewData = [];
                            dabhIds = [];
                            for(var i=0;i<data.data.length;i++){
                                NewData.push(data.data[i]);
                                dabhIds.push(data.data[i].dabh);
                            }
                            var data = {
                                rows: NewData,
                                total:data.total
                            };
                            return data;
                        }
                    }
                });
            },
            //查询科技
            searchKj:function(){
                $("#daTable").bootstrapTable('destroy');
                $('#daTable').bootstrapTable({
                    url: this.getUrl(),
                    contentType: "application/json; charset=UTF-8",
                    type: "GET",
                    dataType: 'json',
                    queryParamsType: "",
                    sortName : 'sxh',
                    sortOrder : 'desc',
                    singleSelect: true,
                    striped: true,
                    smartDisplay: false,
                    cache: false,
                    pagination:true,  //设置为 true 会在表格底部显示分页条。
                    paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                    pageSize:10,//每页初始显示的条数
                    pageList:[5,10],
                    toolbar: "#addtool",
                    sidePagination: 'server',
                    queryParams: function (params) {
                        this.sort = params.sortOrder;
                        return {
                            'pageNum':params.pageNumber,
                            'pageSize':params.pageSize,
                            'sort':params.sortOrder,
                        }
                    },
                    columns: [
                    //     {
                    //     checkbox : true,
                    // },
                        {
                        field: 'sxh',
                        title: '顺序号',
                        sortable : true
                    },{
                        field: 'dabh',
                        title: '档案编号'
                    }, {
                        field: 'ajtm',
                        title: '案卷题名'
                    }, {
                        field: 'year',
                        title: '年份',
                    }, {
                        field: 'dtslbh',
                        title: '大厅受理编号'
                    }, {
                        field: 'jsdw',
                        title: '建设单位',
                    },{
                        field: 'cz',
                        title: '操作',
                        formatter: function (value, row, index) {
                            //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                            return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showXq(\''+row.dabh+'\',\''+row.typeId+'\')">详情</a>'
                        }
                    }],
                    responseHandler: function (res) {  //后台返回的结果
                        if (res.code == "200") {
                            var data = res.data;
                            var NewData = [];
                            dabhIds = [];
                            for(var i=0;i<data.data.length;i++){
                                NewData.push(data.data[i]);
                                dabhIds.push(data.data[i].dabh);
                            }
                            var data = {
                                rows: NewData,
                                total:data.total
                            };
                            return data;
                        }
                    }
                });
            },
            //得到勾选的url
            getCheckedUrl:function(tableName,baseUrl){
                var url;
                var checkedIds = new Array();
                var rows = $("#daTable").bootstrapTable('getSelections');
                if(rows.length === 0){
                    url = baseUrl+dabhIds;
                }else {
                    for(var i = 0;i < rows.length;i++){
                        checkedIds.push(rows[i].dabh);
                    }
                    url = baseUrl+checkedIds;
                }
                return url;
            },
            //查询材料
            searchCl:function(){
                $("#clTable").bootstrapTable('destroy');
                $('#clTable').bootstrapTable({
                    url: this.getCheckedUrl("clTable","/queryClxxAll?dabhs="),
                    contentType: "application/json; charset=UTF-8",
                    type: "GET",
                    dataType: 'json',
                    queryParamsType: "",
                    sortName : 'sxh',
                    sortOrder : 'desc',
                    singleSelect: true,
                    striped: true,
                    smartDisplay: false,
                    cache: false,
                    pagination:true,  //设置为 true 会在表格底部显示分页条。
                    paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                    pageSize:10,//每页初始显示的条数
                    pageList:[5,10],
                    toolbar: "#addtool",
                    sidePagination: 'server',
                    queryParams: function (params) {
                        this.sort = params.sortOrder;
                        return {
                            'pageNum':params.pageNumber,
                            'pageSize':params.pageSize,
                            'sort':params.sortOrder,
                        };
                    },
                    columns: [{
                        field: 'id',
                        title: '序号',
                        sortable : true
                    },{
                        field: 'dabh',
                        title: '档案编号'
                    }, {
                        field: 'wjxh',
                        title: '文件序号'
                    }, {
                        field: 'clmc',
                        title: '材料名称',
                    }, {
                        field: 'otherZh',
                        title: '案卷号/文号/许可证号'
                    }, {
                        field: 'typeName',
                        title: '类型',
                    },{
                        field: 'cz',
                        title: '操作',
                        formatter: function (value, row, index) {
                            return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showClxq('+row.id+')">详情</a>'
                        }
                    }],
                    responseHandler: function (res) {  //后台返回的结果
                        if (res.code == "200") {
                            var data = res.data;
                            var NewData = [];
                            if(data.data !== null){
                                for(i=0;i<data.data.length;i++){
                                    NewData.push(data.data[i]);
                                }
                            }
                            var data = {
                                rows: NewData,
                                total:data.total
                            };
                            return data;
                        }
                    }
                });
            },
            //查询材料search界面
            searchCl2:function(){
                if(vue.$data.keyword == null){

                    $("#clTable2").bootstrapTable('destroy');
                    $('#clTable2').bootstrapTable({
                        url: this.getCheckedUrl("clTable2","/queryClxxAll?lxs="),
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        sortName : 'sxh',
                        sortOrder : 'desc',
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:10,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            this.sort = params.sortOrder;
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                                'sort':params.sortOrder,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            sortable : true
                        },{
                            field: 'dabh',
                            title: '档案编号'
                        }, {
                            field: 'wjxh',
                            title: '文件序号'
                        }, {
                            field: 'clmc',
                            title: '材料名称',
                        }, {
                            field: 'otherZh',
                            title: '案卷号/文号/许可证号'
                        }, {
                            field: 'typeName',
                            title: '类型',
                        },{
                            field: 'cz',
                            title: '操作',
                            formatter: function (value, row, index) {
                                return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showClxq('+row.id+')">详情</a>'
                            }
                        }],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(i=0;i<data.data.length;i++){
                                    NewData.push(data.data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }else {
                    $("#clTable2").bootstrapTable('destroy');
                    $('#clTable2').bootstrapTable({
                        url: "/queryClxxAll?lxs="+wdlxIds,
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        sortName : 'sxh',
                        sortOrder : 'desc',
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:10,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            this.sort = params.sortOrder;
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                                'keyword':vue.$data.keyword,
                                'sort':params.sortOrder,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            sortable : true
                        },{
                            field: 'dabh',
                            title: '档案编号'
                        }, {
                            field: 'wjxh',
                            title: '文件序号'
                        }, {
                            field: 'clmc',
                            title: '材料名称',
                        }, {
                            field: 'otherZh',
                            title: '案卷号/文号/许可证号'
                        }, {
                            field: 'typeName',
                            title: '类型',
                        },{
                            field: 'cz',
                            title: '操作',
                            formatter: function (value, row, index) {
                                return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showClxq('+row.id+')">详情</a>'
                            }
                        }],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(i=0;i<data.data.length;i++){
                                    NewData.push(data.data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }
            },
            //返回
            goback:function(){
                this.showstart = false;
                this.showSearch = true;
                this.showmain = false;
                this.searchShow = true;
                this.searchDalx();
            },
            //卷内文件库
            jnwjk:function(){
                this.showstart = false;
                this.showSearch  =false;
                this.showmain = true;
                this.daShow = false;
                this.clShow = true;
                //this.wdlx = -1;
                this.searchShow = false;
                this.searchCl();
            },
            cancelUp:function(){
                this.daShow = true;
                this.clShow = false;
            },
            jnwjk2:function(){
                this.showstart = false;
                this.showSearch  =true;
                this.showmain = false;
                this.daShow2 = false;
                this.clShow2 = true;
                //this.wdlx = -1;
                this.searchCl2();
            },
            //取消
            cancelSearch:function(){
                if(this.showmain){
                    this.tjjs();
                }else {
                    this.searchDalx();
                }
            },
            //得到关键字
            getkeyword:function(){
                if(this.daShow2){
                    this.searchDalx();
                }else {
                    this.searchCl2();
                }
            },
            //导出
            dc:function(){
                var url;
                if(this.clShow){
                    if(this.keyword === null){
                        url = 'outClxxExcel?dabhs='+dabhIds;
                    }else {
                        url = 'outClxxExcel?dabhs='+dabhIds;
                    }
                }else {
                    if(this.keyword === null || this.keyword === ''){
                        url = 'outExcel?wdlx='+this.wdlx+'&sort='+this.sort;
                    }else {
                        url = 'outExcel?wdlx='+this.wdlx+'&keyword='+this.keyword+'&sort='+this.sort;
                    }
                    if(this.startyear == null && this.stopyear == null){
                        url = url;
                    }else if(this.startyear != null && this.stopyear != null) {
                        url += '&startyear='+this.startyear+'&stopyear='+this.stopyear;
                    }else if(this.startyear != null){
                        url += '&startyear='+this.startyear;
                    }else if(this.stopyear != null){
                        url += '&stopyear='+this.stopyear;
                    }
                }
                window.open(url);
            },
            sureLxSelect:function(){
                $('#lxxzModal').modal('hide');
            },
            close:function(){
                $('#lxxzModal').modal('hide');
            },
            tjjs:function(){
                dabhIds = [];
                this.showstart = false;
                this.showSearch  =false;
                this.showmain = true;

                vue.$data.clShow = false;
                if(vue.$data.root === "科技"){
                    if(!this.isGryf){
                        vue.$data.daShow = true;
                        vue.$data.gryfShow = false;
                        this.searchKj();
                    }else {
                        vue.$data.daShow = false;
                        vue.$data.gryfShow = true;
                        this.searchGryf();
                    }

                }else {
                    vue.$data.daShow = true;
                    vue.$data.gryfShow = false;
                    this.searchWs();
                }
            },
            tjjs2:function(){
                if(this.keyword === null){
                    cxAlert("请输入检索关键词")
                    return;
                }
                $('#bj2').css("opacity", 0);
                $('#bj1').css("opacity", 0)
                // document.getElementById('bj1').src = "/static/img/jsbj2.jpg";
                // document.getElementById('bj2').src = "/static/img/jsbj2.jpg";
                $('#bj2').css('backgroundColor','#ffffff');
                vue.$data.showstart = false;
                vue.$data.showSearch = true;
                this.searchDalx();
            },
            //大类型表格查询
            searchDalx:function () {
                if(this.keyword == null){
                    var url = '/dajsOuterCx2?wdlx='+wdlxIds;
                    if(this.startyear == null && this.stopyear == null){
                        url = url;
                    }else if(this.startyear == null){
                        url = url+'&stopyear='+this.stopyear;
                    }else if(this.stopyear == null){
                        url = url+'&startyear='+this.startyear;
                    }else {
                        url = url+'&stopyear='+this.stopyear+'&startyear='+this.startyear;
                    }
                    $("#dalxTable").bootstrapTable('destroy');
                    $('#dalxTable').bootstrapTable({
                        url: url,
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        //pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:10,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            formatter:serialNumber
                        },{
                            field: 'root',
                            title: '主要类型',
                            formatter:paramsMatter
                        }, {
                            field: 'dalx',
                            title: '详细类型',
                            formatter:paramsMatter
                        },{
                            field: 'number',
                            title: '查询结果',
                            formatter:paramsMatter
                        }
                            ,{
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:ck('+row.dalxId+',\''+row.root+'\',\''+row.dalx+'\')">查看</a>'
                                }
                            }
                        ],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(var i=0;i<data.length;i++){
                                    NewData.push(data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }else {
                    var url = '/dajsOuterCx2?wdlx='+wdlxIds+'&keyword='+this.keyword;
                    if(this.startyear == null && this.stopyear == null){
                        url = url;
                    }else if(this.startyear == null){
                        url = url+'&stopyear='+this.stopyear;
                    }else if(this.stopyear == null){
                        url = url+'&startyear='+this.startyear;
                    }else {
                        url = url+'&stopyear='+this.stopyear+'&startyear='+this.startyear;
                    }
                    $("#dalxTable").bootstrapTable('destroy');
                    $('#dalxTable').bootstrapTable({
                        url: url,
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        //pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:10,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            formatter:serialNumber
                        },{
                            field: 'root',
                            title: '主要类型',
                            formatter:paramsMatter
                        }, {
                            field: 'dalx',
                            title: '详细类型',
                            formatter:paramsMatter
                        },{
                            field: 'number',
                            title: '查询结果',
                            formatter:paramsMatter
                        }
                            ,{
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:ck('+row.dalxId+',\''+row.root+'\',\''+row.dalx+'\')">查看</a>'
                                }
                            }
                        ],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(var i=0;i<data.length;i++){
                                    NewData.push(data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }

            }
        },
        created: function () {
            this.$http.get('/dagl/api/queryAllLx').then( function (result) {
                var data = result.body;
                if(data.code == 200){
                    this.allLx = data.data;
                    //vue.$data.wdlx =data.data[0].id;
                }else{
                    cxAlert(data.mess);
                }
            })
        },
        mounted: function () {
            var that = this;
            var ylb = location.search;
            var wdlx = ylb.substring(0,ylb.indexOf('&'));
            ylb = ylb.substring(ylb.indexOf('&')+1);
            var startyear = ylb.substring(ylb.indexOf('=')+1,ylb.indexOf('&'));
            ylb = ylb.substring(ylb.indexOf('&')+1);
            wdlx = wdlx.substring(wdlx.indexOf('=')+1);
            startyear = startyear.substring(startyear.indexOf('=')+1);
            var stopyear = ylb.substring(ylb.indexOf('=')+1);
            if(startyear != undefined && stopyear != undefined && wdlx != undefined && startyear !== "" && stopyear !== "" && wdlx !== ""){
                wdlx = Number(wdlx);
                startyear = Number(startyear);
                stopyear = Number(stopyear);
                that.startyear = startyear;
                that.stopyear = stopyear;
                that.wdlx = wdlx;
                $('#bj2').css("opacity", 0);
                $('#bj1').css("opacity", 0);
                $('#bj2').css('backgroundColor','#ffffff');
            }
            that.$http.get('/dagl/api/queryDalx').then( function (result) {
                var that = this;
                var data = result.body;
                if(data.code == 200){
                    var nodes = data.data[0].nodes;
                    $('#dalxTree').treeview({
                        color: "#428bca",
                        collapseIcon: "glyphicon glyphicon-minus",//可收缩的节点图标
                        // nodeIcon: "glyphicon glyphicon-user",
                        emptyIcon: "glyphicon glyphicon-file",//设置列表树中没有子节点的节点的图标
                        expandIcon: "glyphicon glyphicon-plus",  //设置列表上中有子节点的图标
                        highlightSearchResults:true,//是否高亮搜索结果 默认true
                        highlightSelected:false,     //是否选中高亮显示
                        onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                        levels: getCj(data.data) ,                 //设置初始化展开几级菜单 默认为2
                        //selectedIcon: 'glyphicon glyphicon-tint',
                        showBorder:true,                //是否显示边框
                        showCheckbox:true,              //是否显示多选框
                        data:nodes,
                        showTags:true,
                        onNodeSelected:function(event, data) {
                            $('#dalxTree').treeview('checkNode', data.nodeId, {
                                silent: true
                            });
                        },
                        onNodeChecked: function (event,node) {
                            var id = node.id;
                            var kjNodes = nodes[0];
                            var kjId = kjNodes.id;
                            var wsNodes = nodes[1];
                            var wsId = wsNodes.id;
                            for(var j = 0;j <kjNodes.nodes.length;j++){
                                if(kjNodes.nodes[j].id === id){
                                    for(var k = 0;k <wdlxIds.length;k++){
                                        if(kjId === wdlxIds[k]){
                                            wdlxIds.splice(k,1);
                                            break;
                                        }
                                    }
                                    $('#dalxTree').treeview('uncheckNode', 0, {
                                        silent: true
                                    });
                                    break;
                                }
                            }
                            for(var m = 0;m <wsNodes.nodes.length;m++){
                                if(wsNodes.nodes[m].id === id){
                                    for(var n = 0;n <wdlxIds.length;n++){
                                        if(wsId === wdlxIds[n]){
                                            wdlxIds.splice(n,1);
                                            break;
                                        }
                                    }
                                    $('#dalxTree').treeview('uncheckNode', 6, {
                                        silent: true
                                    });
                                    break;
                                }
                            }
                            wdlxIds.push(id);
                            that.searchDalx();
                            that.searchCl2();
                        },
                        onNodeUnchecked: function (event,node) {
                            var text = node.text;
                            var id = node.id;
                            for(var i = 0;i <wdlxIds.length;i++){
                                if(id === wdlxIds[i]){
                                    wdlxIds.splice(i,1);
                                    break;
                                }
                            }
                            if(!(text === "科技档案" || text === "文书档案")){
                                that.searchDalx();
                                that.searchCl2();
                            }
                        },
                    });
                    //getid(data.data);
                    getkjAndws(data.data);
                    that.wdlxName = that.kj;
                    if(startyear != undefined && stopyear != undefined && wdlx != undefined && startyear !== "" && stopyear !== "" && wdlx !== ""){
                        that.showstart = false;
                        that.showmain = true;
                        if(isKj(wdlx)){
                            this.$http.get('/dajsOuterCx2').then(function (result) {
                                var data = result.data;
                                var gryf;
                                if(data.code == 200){
                                    var dalxs = data.data;
                                    for(var i = 0;i < dalxs.length;i++){
                                        if(dalxs[i].dalx == '个人用房'){
                                            gryf = dalxs[i].dalxId;
                                            break;
                                        }
                                    }
                                    if(gryf == wdlx){
                                        //个人用房
                                        $("#daTable").bootstrapTable('destroy');
                                        $('#daTable').bootstrapTable({
                                            url: '/daylbQuery',
                                            contentType: "application/json; charset=UTF-8",
                                            type: "GET",
                                            dataType: 'json',
                                            queryParamsType: "",
                                            sortName : 'sxh',
                                            sortOrder : 'desc',
                                            singleSelect: true,
                                            striped: true,
                                            smartDisplay: false,
                                            cache: false,
                                            pagination:true,  //设置为 true 会在表格底部显示分页条。
                                            paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                                            pageSize:10,//每页初始显示的条数
                                            pageList:[5,10],
                                            toolbar: "#addtool",
                                            sidePagination: 'server',
                                            queryParams: function (params) {
                                                that.sort = params.sortOrder;
                                                return {
                                                    'pageNum':params.pageNumber,
                                                    'pageSize':params.pageSize,
                                                    'wdlx':wdlx,
                                                    //'keyword':that.keyword,
                                                    'startyear':startyear,
                                                    'stopyear':stopyear,
                                                    'sort':params.sortOrder,
                                                };
                                            },
                                            columns: [
                                            //     {
                                            //     checkbox : true,
                                            // },
                                                {
                                                field: 'id',
                                                title: '顺序号',
                                                sortable : true,
                                                formatter:paramsMatter
                                            },{
                                                field: 'dabh',
                                                title: '档案编号',
                                                formatter:paramsMatter
                                            }, {
                                                field: 'townBsc',
                                                title: '镇/办事处',
                                                formatter:paramsMatter
                                            },{
                                                field: 'villageJwh',
                                                title: '村/居委会',
                                                formatter:paramsMatter
                                            }, {
                                                field: 'zhh',
                                                title: '案卷题名',
                                                formatter:paramsMatter
                                            }, {
                                                field: 'sqcl',
                                                title: '申请材料',
                                                formatter:paramsMatter
                                            },{
                                                field: 'cz',
                                                title: '操作',
                                                formatter: function (value, row, index) {
                                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showXq(\''+row.dabh+'\',\''+row.typeId+'\')">详情</a>'
                                                }
                                            }],
                                            responseHandler: function (res) {  //后台返回的结果
                                                if (res.code == "200") {
                                                    var data = res.data;
                                                    var NewData = [];
                                                    dabhIds = [];
                                                    for(i=0;i<data.data.length;i++){
                                                        NewData.push(data.data[i]);
                                                        dabhIds.push(data.data[i].dabh);
                                                    }
                                                    var data = {
                                                        rows: NewData,
                                                        total:data.total
                                                    };
                                                    return data;
                                                }
                                            }
                                        });
                                    }else{
                                        $("#daTable").bootstrapTable('destroy');
                                        $('#daTable').bootstrapTable({
                                            url: '/daylbQuery',
                                            contentType: "application/json; charset=UTF-8",
                                            type: "GET",
                                            dataType: 'json',
                                            queryParamsType: "",
                                            sortName : 'sxh',
                                            sortOrder : 'desc',
                                            singleSelect: true,
                                            striped: true,
                                            smartDisplay: false,
                                            cache: false,
                                            pagination:true,  //设置为 true 会在表格底部显示分页条。
                                            paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                                            pageSize:10,//每页初始显示的条数
                                            pageList:[5,10],
                                            toolbar: "#addtool",
                                            sidePagination: 'server',
                                            queryParams: function (params) {
                                                that.sort = params.sortOrder;
                                                return {
                                                    'pageNum':params.pageNumber,
                                                    'pageSize':params.pageSize,
                                                    'wdlx':wdlx,
                                                    //'keyword':that.keyword,
                                                    'startyear':startyear,
                                                    'stopyear':stopyear,
                                                    'sort':params.sortOrder,
                                                };
                                            },
                                            columns: [
                                            //     {
                                            //     checkbox : true,
                                            // },
                                                {
                                                field: 'sxh',
                                                title: '顺序号',
                                                sortable : true
                                            },{
                                                field: 'dabh',
                                                title: '档案编号'
                                            }, {
                                                field: 'ajtm',
                                                title: '案卷题名'
                                            }, {
                                                field: 'year',
                                                title: '年份',
                                            }, {
                                                field: 'dtslbh',
                                                title: '大厅受理编号'
                                            }, {
                                                field: 'jsdw',
                                                title: '建设单位',
                                            },{
                                                field: 'cz',
                                                title: '操作',
                                                formatter: function (value, row, index) {
                                                    //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showXq(\''+row.dabh+'\',\''+row.typeId+'\')">详情</a>'
                                                }
                                            }],
                                            responseHandler: function (res) {  //后台返回的结果
                                                if (res.code == "200") {
                                                    var data = res.data;
                                                    var NewData = [];
                                                    dabhIds = [];
                                                    for(i=0;i<data.data.length;i++){
                                                        NewData.push(data.data[i]);
                                                        dabhIds.push(data.data[i].dabh);
                                                    }
                                                    var data = {
                                                        rows: NewData,
                                                        total:data.total
                                                    };
                                                    return data;
                                                }
                                            }
                                        });
                                    }
                                }
                            })
                        }else {
                            $("#daTable").bootstrapTable('destroy');
                            $('#daTable').bootstrapTable({
                                url: '/daylbQuery',
                                contentType: "application/json; charset=UTF-8",
                                type: "GET",
                                dataType: 'json',
                                queryParamsType: "",
                                sortName : 'id',
                                sortOrder : 'desc',
                                singleSelect: true,
                                striped: true,
                                smartDisplay: false,
                                cache: false,
                                pagination:true,  //设置为 true 会在表格底部显示分页条。
                                paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                                pageSize:10,//每页初始显示的条数
                                pageList:[5,10],
                                toolbar: "#addtool",
                                sidePagination: 'server',
                                queryParams: function (params) {
                                    that.sort = params.sortOrder;
                                    return {
                                        'pageNum':params.pageNumber,
                                        'pageSize':params.pageSize,
                                        'wdlx':wdlx,
                                        //'keyword':that.keyword,
                                        'startyear':startyear,
                                        'stopyear':stopyear,
                                        'sort':params.sortOrder,
                                    };
                                },
                                columns: [
                                //     {
                                //     checkbox : true,
                                // },
                                    {
                                    field: 'id',
                                    title: '顺序号',
                                    sortable : true
                                },{
                                    field: 'dabh',
                                    title: '档案编号'
                                }, {
                                    field: 'ajtm',
                                    title: '案卷题名'
                                },{
                                    field: 'wh',
                                    title: '文号'
                                }, {
                                    field: 'dwmc',
                                    title: '单位名称'
                                }, {
                                    field: 'typeName',
                                    title: '档案类型'
                                }, {
                                    field: 'year',
                                    title: '档案年份',
                                },{
                                    field: 'cz',
                                    title: '操作',
                                    formatter: function (value, row, index) {
                                        //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                        return '<a style="color: #2C72E8;font-size: 16px" href="javascript:showXq(\''+row.dabh+'\',\''+row.typeId+'\')">详情</a>'
                                    }
                                }],
                                responseHandler: function (res) {  //后台返回的结果
                                    if (res.code == "200") {
                                        var data = res.data;
                                        var NewData = [];
                                        dabhIds = [];
                                        for(i=0;i<data.data.length;i++){
                                            NewData.push(data.data[i]);
                                            dabhIds.push(data.data[i].dabh);
                                        }
                                        var data = {
                                            rows: NewData,
                                            total:data.total
                                        };
                                        return data;
                                    }
                                }
                            });
                        }
                    }
                }else {
                    cxAlert(data.mess);
                }
            })
        }
    });


</script>

</body>
</html>
